/**
 * chinagoods.com
 * Copyright (c) 2020-2024 All Rights Reserved.
 */
package com.ruoyi.system.biz.impl;

import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.enums.ChannelEnum;
import com.ruoyi.common.exception.BusiException;
import com.ruoyi.common.utils.QRCodeUtil;
import com.ruoyi.common.utils.RequestUtil;
import com.ruoyi.system.biz.BankBizService;
import com.ruoyi.system.biz.TGBizService;
import com.ruoyi.system.domain.Bank;
import com.ruoyi.system.service.BankService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.system.service.UserRateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

/**
 * @author yangpeng
 * Created by on 2024-01-30 13:04
 */
@Service
@Slf4j
public class TGBizServiceImpl extends BaseBizServiceImpl implements TGBizService {

    @Resource
    private ThreadPoolTaskExecutor threadPoolTaskExecutor;

    @Override
    public void sendWarnMsg(String msg) {
        threadPoolTaskExecutor.execute(() -> {
            Map<String, Object> map = new HashMap<>();
            map.put("text", msg);
            try {
                RequestUtil.postJson("http://43.156.231.185:8088/api/orderPay/warn", map);
            } catch (Exception e) {
                log.info("错误信息:{}", e.getMessage());
            }
        });

    }
}